import java.util.Scanner;

public class QuessMachine {
    public int random;
   public int guessI;
   public int dollar;
    public void initial(){
        switch (random){
            case 1:
                System.out.println("一个港币的价值");
                dollar=500;
                break;
            case 2:
                System.out.println("一个电脑的价值");
                dollar=2000;
                break;
            case 3:
                System.out.println("一个美女的价值");
                dollar=5000;
                break;
            default:
                break;
        }
    }
    public void guess(){
        do { Scanner input=new Scanner(System.in);
            System.out.println("请您猜数：");
         guessI=input.nextInt();
            if (guessI>dollar){
                System.out.println("再小些");
            }
            else if (guessI<dollar){
                System.out.println("再大些");
            }
            else {
                System.out.println("猜对了");
                break;
            }
        }while (true);
    }

    public static void main(String[] args) {
        Scanner input=new Scanner(System.in);
       QuessMachine m=new QuessMachine();
       m.random=(int)(3*Math.random());
       m.initial();
       m.guess();
    }
}
